package soundsystem;

public class CDPlayer implements MediaPlayer {
  private CompactDisc cd;
  //存储注入对象的内存地址
  private String cId;

  public CDPlayer(CompactDisc cd) {
    this.cd = cd;
    cId=cd.toString();
  }

  public void play() {
    cd.play();
  }

  public String getcId() {
    return cId;
  }
}
